package com.lwz.multi.impl;

import com.lwz.multi.mapper.UserMapper;
import com.lwz.multi.pojo.User;
import com.lwz.multi.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Lw中
 * @date 2020/9/18 21:14
 */
@Service
public class UserServiceImpl implements UserService {

    /* 获取打印日志类 */
    private final Logger log = LoggerFactory.getLogger(getClass());

    @Autowired
    private UserMapper userMapper;

    public User getUser(String userId) {
        /* 打印输出用户id */
        log.info("查询用户id" + userId);
        User user = userMapper.queryUserByUserId(userId);
        return user;
    }
}
